<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>show video</title>
    <link href="css/video-js.min.css" rel="stylesheet">
    <script src="js/video.min.js"></script>
    <style>
        body {
            background-color: #252525
        }
    </style>
</head>

<body>

<div class="m">
    <video
            id="my-player"
            class="video-js"
            controls
            preload="auto"
            poster="//vjs.zencdn.net/v/oceans.png"
            data-setup='{}'>
        <source src="http://localhost:8080/js_player/res/test.mp4" type="video/mp4"/>
        <p class="vjs-no-js">
            To view this video please enable JavaScript, and consider upgrading to a
            web browser that
            <a href="http://videojs.com/html5-video-support/" target="_blank">
                supports HTML5 video
            </a>
        </p>
    </video>
</div>

<script type="text/javascript">
    //打开自动播放
    var myPlayer = videojs('my-player');
    videojs("my-player").ready(function () {
        var myPlayer = this;
        myPlayer.play();
    });
</script>
</body>
</html>
